package cn.wolfcode.shop.cloud.web.feign;

import cn.wolfcode.shop.cloud.common.Result;
import cn.wolfcode.shop.cloud.domain.Good;
import cn.wolfcode.shop.cloud.feign.GoodsFeignApi;
import cn.wolfcode.shop.cloud.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
public class GoodsFeignClient implements GoodsFeignApi {
    @Autowired
    private IGoodsService goodsService;

    @Override
    public Result<List<Good>> queryGoods(ArrayList<Long> ids) {
        return new Result().success(goodsService.queryByIds(ids));
    }
}
